﻿using SocketGateway.DTO;

namespace SocketGateway.Tool
{
    /// <summary>
    /// 内存数据
    /// </summary>
    public class Data
    {
        /// <summary>
        /// 菜单数据
        /// </summary>
        public static List<MenuDto> MenuData { get; set; } = new List<MenuDto>
        {
            new MenuDto { Id = 9, Type = 1, Icon = "layui-icon layui-icon-console", Title = "主页", Href = "/home/home" },
            new MenuDto { Id = 10, Type = 1, Icon = "layui-icon layui-icon-console", Title = "监听器", Href = "/socket/listener" },
            new MenuDto { Id = 11, Type = 1, Icon = "layui-icon layui-icon-console", Title = "客户端", Href = "/socket/client" },
            new MenuDto
            {
                Id = 90,
                Type = 0,
                Icon = "layui-icon layui-icon-console",
                Title = "系统设置",
                Children = new List<MenuDto>{
                    new MenuDto{Id = 9001, Type = 1, Icon = "layui-icon layui-icon-console", Title = "黑名单配置", Href = "/socket/white_black"}
                }
            }
        };

        /// <summary>
        /// socket地址数据
        /// </summary>
        public static List<string> Listener { get; set; } = new List<string>();

        /// <summary>
        /// 连接日志字典：key->clientid; value->对应数据列表
        /// </summary>
        public static Dictionary<string, List<string>> LogData { get; set; } = new Dictionary<string, List<string>>();
    }
}
